import VueRouter from 'vue-router'

//引入组件
import Index from '../pages'
import Home from '../pages/home/home'
import Login from '../pages/login/login'
import Register from '../pages/register/register'
import Center from '../pages/center/center'
import Storeup from '../pages/storeup/list'
import News from '../pages/news/news-list'
import NewsDetail from '../pages/news/news-detail'
import payList from '../pages/pay'

import xueyuanList from '../pages/xueyuan/list'
import xueyuanDetail from '../pages/xueyuan/detail'
import xueyuanAdd from '../pages/xueyuan/add'
import shoukejiaoshiList from '../pages/shoukejiaoshi/list'
import shoukejiaoshiDetail from '../pages/shoukejiaoshi/detail'
import shoukejiaoshiAdd from '../pages/shoukejiaoshi/add'
import jiaofujiaoshiList from '../pages/jiaofujiaoshi/list'
import jiaofujiaoshiDetail from '../pages/jiaofujiaoshi/detail'
import jiaofujiaoshiAdd from '../pages/jiaofujiaoshi/add'
import jiaoxuebanList from '../pages/jiaoxueban/list'
import jiaoxuebanDetail from '../pages/jiaoxueban/detail'
import jiaoxuebanAdd from '../pages/jiaoxueban/add'
import kechengleixingList from '../pages/kechengleixing/list'
import kechengleixingDetail from '../pages/kechengleixing/detail'
import kechengleixingAdd from '../pages/kechengleixing/add'
import kechengxinxiList from '../pages/kechengxinxi/list'
import kechengxinxiDetail from '../pages/kechengxinxi/detail'
import kechengxinxiAdd from '../pages/kechengxinxi/add'
import xuexijiluList from '../pages/xuexijilu/list'
import xuexijiluDetail from '../pages/xuexijilu/detail'
import xuexijiluAdd from '../pages/xuexijilu/add'
import kechengjinduList from '../pages/kechengjindu/list'
import kechengjinduDetail from '../pages/kechengjindu/detail'
import kechengjinduAdd from '../pages/kechengjindu/add'
import ketangdianmingList from '../pages/ketangdianming/list'
import ketangdianmingDetail from '../pages/ketangdianming/detail'
import ketangdianmingAdd from '../pages/ketangdianming/add'
import ketangqiandaoList from '../pages/ketangqiandao/list'
import ketangqiandaoDetail from '../pages/ketangqiandao/detail'
import ketangqiandaoAdd from '../pages/ketangqiandao/add'
import ketangqingjiaList from '../pages/ketangqingjia/list'
import ketangqingjiaDetail from '../pages/ketangqingjia/detail'
import ketangqingjiaAdd from '../pages/ketangqingjia/add'
import ketangpingjiaList from '../pages/ketangpingjia/list'
import ketangpingjiaDetail from '../pages/ketangpingjia/detail'
import ketangpingjiaAdd from '../pages/ketangpingjia/add'
import ketangzuoyeList from '../pages/ketangzuoye/list'
import ketangzuoyeDetail from '../pages/ketangzuoye/detail'
import ketangzuoyeAdd from '../pages/ketangzuoye/add'
import zuoyetijiaoList from '../pages/zuoyetijiao/list'
import zuoyetijiaoDetail from '../pages/zuoyetijiao/detail'
import zuoyetijiaoAdd from '../pages/zuoyetijiao/add'
import zuoyepiyueList from '../pages/zuoyepiyue/list'
import zuoyepiyueDetail from '../pages/zuoyepiyue/detail'
import zuoyepiyueAdd from '../pages/zuoyepiyue/add'
import richanghuodongList from '../pages/richanghuodong/list'
import richanghuodongDetail from '../pages/richanghuodong/detail'
import richanghuodongAdd from '../pages/richanghuodong/add'
import huodongleixingList from '../pages/huodongleixing/list'
import huodongleixingDetail from '../pages/huodongleixing/detail'
import huodongleixingAdd from '../pages/huodongleixing/add'
import huodongbaomingList from '../pages/huodongbaoming/list'
import huodongbaomingDetail from '../pages/huodongbaoming/detail'
import huodongbaomingAdd from '../pages/huodongbaoming/add'
import huodongpingjiaList from '../pages/huodongpingjia/list'
import huodongpingjiaDetail from '../pages/huodongpingjia/detail'
import huodongpingjiaAdd from '../pages/huodongpingjia/add'
import newstypeList from '../pages/newstype/list'
import newstypeDetail from '../pages/newstype/detail'
import newstypeAdd from '../pages/newstype/add'
import discusskechengxinxiList from '../pages/discusskechengxinxi/list'
import discusskechengxinxiDetail from '../pages/discusskechengxinxi/detail'
import discusskechengxinxiAdd from '../pages/discusskechengxinxi/add'
import discussrichanghuodongList from '../pages/discussrichanghuodong/list'
import discussrichanghuodongDetail from '../pages/discussrichanghuodong/detail'
import discussrichanghuodongAdd from '../pages/discussrichanghuodong/add'

const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
	return originalPush.call(this, location).catch(err => err)
}

//配置路由
export default new VueRouter({
	routes:[
		{
      path: '/',
      redirect: '/index/home'
    },
		{
			path: '/index',
			component: Index,
			children:[
				{
					path: 'home',
					component: Home
				},
				{
					path: 'center',
					component: Center,
				},
				{
					path: 'pay',
					component: payList,
				},
				{
					path: 'storeup',
					component: Storeup
				},
				{
					path: 'news',
					component: News
				},
				{
					path: 'newsDetail',
					component: NewsDetail
				},
				{
					path: 'xueyuan',
					component: xueyuanList
				},
				{
					path: 'xueyuanDetail',
					component: xueyuanDetail
				},
				{
					path: 'xueyuanAdd',
					component: xueyuanAdd
				},
				{
					path: 'shoukejiaoshi',
					component: shoukejiaoshiList
				},
				{
					path: 'shoukejiaoshiDetail',
					component: shoukejiaoshiDetail
				},
				{
					path: 'shoukejiaoshiAdd',
					component: shoukejiaoshiAdd
				},
				{
					path: 'jiaofujiaoshi',
					component: jiaofujiaoshiList
				},
				{
					path: 'jiaofujiaoshiDetail',
					component: jiaofujiaoshiDetail
				},
				{
					path: 'jiaofujiaoshiAdd',
					component: jiaofujiaoshiAdd
				},
				{
					path: 'jiaoxueban',
					component: jiaoxuebanList
				},
				{
					path: 'jiaoxuebanDetail',
					component: jiaoxuebanDetail
				},
				{
					path: 'jiaoxuebanAdd',
					component: jiaoxuebanAdd
				},
				{
					path: 'kechengleixing',
					component: kechengleixingList
				},
				{
					path: 'kechengleixingDetail',
					component: kechengleixingDetail
				},
				{
					path: 'kechengleixingAdd',
					component: kechengleixingAdd
				},
				{
					path: 'kechengxinxi',
					component: kechengxinxiList
				},
				{
					path: 'kechengxinxiDetail',
					component: kechengxinxiDetail
				},
				{
					path: 'kechengxinxiAdd',
					component: kechengxinxiAdd
				},
				{
					path: 'xuexijilu',
					component: xuexijiluList
				},
				{
					path: 'xuexijiluDetail',
					component: xuexijiluDetail
				},
				{
					path: 'xuexijiluAdd',
					component: xuexijiluAdd
				},
				{
					path: 'kechengjindu',
					component: kechengjinduList
				},
				{
					path: 'kechengjinduDetail',
					component: kechengjinduDetail
				},
				{
					path: 'kechengjinduAdd',
					component: kechengjinduAdd
				},
				{
					path: 'ketangdianming',
					component: ketangdianmingList
				},
				{
					path: 'ketangdianmingDetail',
					component: ketangdianmingDetail
				},
				{
					path: 'ketangdianmingAdd',
					component: ketangdianmingAdd
				},
				{
					path: 'ketangqiandao',
					component: ketangqiandaoList
				},
				{
					path: 'ketangqiandaoDetail',
					component: ketangqiandaoDetail
				},
				{
					path: 'ketangqiandaoAdd',
					component: ketangqiandaoAdd
				},
				{
					path: 'ketangqingjia',
					component: ketangqingjiaList
				},
				{
					path: 'ketangqingjiaDetail',
					component: ketangqingjiaDetail
				},
				{
					path: 'ketangqingjiaAdd',
					component: ketangqingjiaAdd
				},
				{
					path: 'ketangpingjia',
					component: ketangpingjiaList
				},
				{
					path: 'ketangpingjiaDetail',
					component: ketangpingjiaDetail
				},
				{
					path: 'ketangpingjiaAdd',
					component: ketangpingjiaAdd
				},
				{
					path: 'ketangzuoye',
					component: ketangzuoyeList
				},
				{
					path: 'ketangzuoyeDetail',
					component: ketangzuoyeDetail
				},
				{
					path: 'ketangzuoyeAdd',
					component: ketangzuoyeAdd
				},
				{
					path: 'zuoyetijiao',
					component: zuoyetijiaoList
				},
				{
					path: 'zuoyetijiaoDetail',
					component: zuoyetijiaoDetail
				},
				{
					path: 'zuoyetijiaoAdd',
					component: zuoyetijiaoAdd
				},
				{
					path: 'zuoyepiyue',
					component: zuoyepiyueList
				},
				{
					path: 'zuoyepiyueDetail',
					component: zuoyepiyueDetail
				},
				{
					path: 'zuoyepiyueAdd',
					component: zuoyepiyueAdd
				},
				{
					path: 'richanghuodong',
					component: richanghuodongList
				},
				{
					path: 'richanghuodongDetail',
					component: richanghuodongDetail
				},
				{
					path: 'richanghuodongAdd',
					component: richanghuodongAdd
				},
				{
					path: 'huodongleixing',
					component: huodongleixingList
				},
				{
					path: 'huodongleixingDetail',
					component: huodongleixingDetail
				},
				{
					path: 'huodongleixingAdd',
					component: huodongleixingAdd
				},
				{
					path: 'huodongbaoming',
					component: huodongbaomingList
				},
				{
					path: 'huodongbaomingDetail',
					component: huodongbaomingDetail
				},
				{
					path: 'huodongbaomingAdd',
					component: huodongbaomingAdd
				},
				{
					path: 'huodongpingjia',
					component: huodongpingjiaList
				},
				{
					path: 'huodongpingjiaDetail',
					component: huodongpingjiaDetail
				},
				{
					path: 'huodongpingjiaAdd',
					component: huodongpingjiaAdd
				},
				{
					path: 'newstype',
					component: newstypeList
				},
				{
					path: 'newstypeDetail',
					component: newstypeDetail
				},
				{
					path: 'newstypeAdd',
					component: newstypeAdd
				},
				{
					path: 'discusskechengxinxi',
					component: discusskechengxinxiList
				},
				{
					path: 'discusskechengxinxiDetail',
					component: discusskechengxinxiDetail
				},
				{
					path: 'discusskechengxinxiAdd',
					component: discusskechengxinxiAdd
				},
				{
					path: 'discussrichanghuodong',
					component: discussrichanghuodongList
				},
				{
					path: 'discussrichanghuodongDetail',
					component: discussrichanghuodongDetail
				},
				{
					path: 'discussrichanghuodongAdd',
					component: discussrichanghuodongAdd
				},
			]
		},
		{
			path: '/login',
			component: Login
		},
		{
			path: '/register',
			component: Register
		},
	]
})
